<style rel="stylesheet/scss" lang="scss" scoped>
    .model-containter {
        display: flex;
        flex: 1;
        min-height: 100%;
        padding: 20px;
		width: 100%;
        box-sizing: border-box;
        flex-direction: column;
        
    }
</style>
<template>
    <div class="model-containter">
        <!--tabs 公用tab -->
		<tabs></tabs>
		<!--我的资产模块-->
		<deal-flow v-if="tabCurrentIndex == 1"></deal-flow>
		<!--交易流水模块-->
		<assets v-if="tabCurrentIndex == 2" ></assets>
		<!--VIN查询模块-->
		<vin-query v-if="tabCurrentIndex == 3"></vin-query>
    </div>
</template>
<script>
	import {
		mapMutations,
		mapGetters
	} from 'vuex'
    import tabs from '@/components/tabs/tabs.vue'
	import assets from './components/assets.vue'
	import dealFlow from './components/deal-flow.vue'
	import vinQuery from './components/vin-query.vue'
	import { secondDirectory, tabList } from '@/utils/config.js'

    export default {
        data() {
            return {
				
            }
        },
		methods: {
			...mapMutations({
				// 设置tab栏的选中状态
				setTabCurrentIndex: 'SET_TAB_CURRENT_INDEX'
			})
		},
		mounted() {
			let val = secondDirectory['trade'].list
			!val[0].show && val[1].show ? this.setTabCurrentIndex(2): ''
		},
		computed: {
			...mapGetters([
				'tabCurrentIndex'
			])
		},
		components: {
			tabs,
			assets,
			dealFlow,
			vinQuery
		}
    }
</script>
